#include "rtda/thread.h"

namespace jvm {
namespace rtda {


int Thread::getPC() const { return _pc; }
void Thread::setPC(int pc) { _pc = pc; }

std::shared_ptr<JvmStack> Thread::getStack() const { return _p_stack; }

void Thread::pushFrame(std::shared_ptr<Frame> frame) { _p_stack->push(frame); }
std::shared_ptr<Frame> Thread::popFrame() { return _p_stack->pop(); }

std::shared_ptr<Frame> Thread::currentFrame() const { return _p_stack->top(); }

std::shared_ptr<Frame> Thread::newFrame(std::shared_ptr<Method> pmethod) { return std::make_shared<Frame>(shared_from_this(), pmethod); }


} // namespace rtda
} // namespace jvm